package com.zuoye.dey03;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

public class Demo1 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("dey11\\src\\com\\zuoye\\dey03\\aaa.txt"));
        ArrayList<Student> list = new ArrayList<>();
        for (String i; (i = br.readLine()) != null; ) {
            String[] split = i.split(",");
            list.add(new Student(split[0],split[1],split[2],split[3]));
        }
        for (Student s : list) {
            System.out.println("姓名:" + s.getName() + "  年龄:" + s.getAge() + "  性别:" + s.getGender() + "  分数:" + s.getGrade());
        }
        br.close();
    }
}
